import {
  get,
  post
} from "./http"

//登录
export const requserlogin = parmas => post("/api/userlogin", parmas)
//菜单

//添加
export const reqmenuadd = parmas => post("/api/menuadd", parmas)
//列表
export const reqmenulist = parmas => get("/api/menulist", parmas)
//一条
export const reqmenuinfo = parmas => get("/api/menuinfo", parmas)
//修改
export const reqmenuedit = parmas => post("/api/menuedit", parmas)
//删除
export const reqmenudelete= parmas => post("/api/menudelete", parmas)


// 角色管理
//添加
export const reqroleadd = parmas => post("/api/roleadd", parmas)
//列表
export const reqrolelist = parmas => get("/api/rolelist", parmas)
//一条
export const reqroleinfo = parmas => get("/api/roleinfo", parmas)
//修改
export const reqroleedit = parmas => post("/api/roleedit", parmas)
//删除
export const reqroledelete= parmas => post("/api/roledelete", parmas)

//管理员管理
//添加
export const requseradd = parmas => post("/api/useradd", parmas)
//列表
export const requserlist = parmas => get("/api/userlist", parmas)
//总条数
export const requsercount = parmas => get("/api/usercount", parmas)
//一条
export const requserinfo = parmas => get("/api/userinfo", parmas)
//修改
export const requseredit = parmas => post("/api/useredit", parmas)
//删除
export const requserdelete= parmas => post("/api/userdelete", parmas)

//商品分类
//添加
export const reqcateadd = parmas => post("/api/cateadd", parmas,true)
//列表
export const reqcatelist = parmas => get("/api/catelist", parmas)
//一条
export const reqcateinfo = parmas => get("/api/cateinfo", parmas)
//修改
export const reqcateedit = parmas => post("/api/cateedit", parmas,true)
//删除
export const reqcatedelete= parmas => post("/api/catedelete", parmas)


//商品规格
//添加
export const reqspecsadd = parmas => post("/api/specsadd", parmas)
//列表
export const reqspecslist = parmas => get("/api/specslist", parmas)
//总条数
export const reqspecscount = parmas => get("/api/specscount", parmas)
//一条
export const reqspecsinfo = parmas => get("/api/specsinfo", parmas)
//修改
export const reqspecsedit = parmas => post("/api/specsedit", parmas)
//删除
export const reqspecsdelete= parmas => post("/api/specsdelete", parmas)

//商品管理
//添加
export const reqgoodsadd = parmas => post("/api/goodsadd", parmas, true)
//列表
export const reqgoodslist = parmas => get("/api/goodslist", parmas)
//总条数
export const reqgoodscount = parmas => get("/api/goodscount", parmas)
//一条
export const reqgoodsinfo = parmas => get("/api/goodsinfo", parmas)
//修改
export const reqgoodsedit = parmas => post("/api/goodsedit", parmas, true)
//删除
export const reqgoodsdelete= parmas => post("/api/goodsdelete", parmas)